4.12 Hypertext Anchors
An anchor is a piece
of text or some other object (for example an image)
which marks the beginning and/or the end
of a hypertext link. The <A>
element is used to mark that piece of text, and
to give its hypertextual relationship to other documents.
The text between the opening and closing tags,
<A attributes> ...text... </A>
can be the start or destination (or both) of
a link. Here are some simple examples:
-
<A HREF="http://www.edu/st/file.html">bla bla</A>
- The string `bla bla' is a hypertext
link to the document `file.html' located
at the indicated URL.
-
<A HREF="image.jpeg">
<IMG SRC="icon.gif"> </A>
- The image `icon.gif' is a hypertext
link to the image file located in the same directory
as the currently accessed document (unless otherwise
specified by the BASE element).
This can allow you to use a small icon
that links the user to a larger version of the
same image. Alternatively the anchor tag could have
been
<A HREF="document.html">
, in which
case the image acts like an icon button than
links the user to the indicated HTML document.
-
<A NAME="frxx">textbla</A>
- The string `textbla' can be the target
of a link. This link is referenced via the form
"file.html#frxx" where 'file.html' is the file that
contains this anchor and `#frxx' is the anchor NAME. If
you are already in `file.html' the file is implicit, so
it can be left out.
Attributes for A and LINK
The following sections describe the attributes appropriate
to either Anchor or LINK elements.
The entries marked '*' are commonly used and should be
well understood. The other attributes are less common,
and can be omitted at an introductory reading.
- HREF (link to object) *
- NAME (link from object) *
- REL (relationship between objects)
- REV (relationship between objects)
- URN (URN for the document)
- TITLE (TITLE of document)
- METHODS (how to link)
© Ian Graham 1994-1995
|
Page Last Updated: 4
December 1995
|